﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using System.Diagnostics;

using Factonomy.AzureStorageUtility.WindowsApp.Resources;

namespace Factonomy.AzureStorageUtility.WindowsApp.UI.Forms
{
    public partial class About : Form
    {
        public About()
        {
            InitializeComponent();

            // set the window icon
            this.Icon = ResourceManager.GetAppIcon();

            this.pbLogo.Image = Image.FromStream(Resources.ResourceManager.Logo());
            this.pbLogo.Top = 10;
            this.pbLogo.Left = 25;
            this.pbLogo.Width = this.pbLogo.Image.Width;
            this.pbLogo.Height = this.pbLogo.Image.Height;

            this.pnlBackground.Top = 0;
            this.pnlBackground.Left = 0;
            this.pnlBackground.Width = this.Width - 2;
            this.pnlBackground.Height = this.pbLogo.Height + 20;

            labelAppName.Text = Globals.AppName;
            this.Text = "About " + Globals.AppName;

            this.labelVersion.Text = "Version " + FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;
        }
    }
}
